package cn.tedu.bonfire.common.pojo.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Document(indexName = "content_article")
public class ArticleSearchPO implements Serializable {
    /**
     * 文章ID
     */
    @Id
    private Long id;

    /**
     * 作者名字
     */
    private String authorName;

    /**
     * 类别名称
     */
    private String categoryName;

    /**
     * 标题
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;

    /**
     * 摘要
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String brief;

    /**
     * 封面图
     */
    private String coverUrl;

    /**
     * 点赞
     */
    @Field(type = FieldType.Integer)
    private Integer upCount;

    /*收藏量*/
    @Field(type = FieldType.Integer)
    private Integer collectTimes;

    /**
     * 浏览量
     */
    @Field(type = FieldType.Integer)
    private Integer clickCount;

    /**
     * 评论量
     */
    @Field(type = FieldType.Integer)
    private Integer commentCount;
}
